package core.domain;

import java.io.File;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;

public class DeleteSandboxMain {

	/**
	 * @param args
	 * @throws JAXBException 
	 */
	public static void main(String[] args) throws JAXBException {
		
		Torrent a = new Torrent();
		a.setFileHash(3);
		a.setFileName("asd.qwe");
		a.setNumberOfPieces(311);
		
		JAXBContext context = JAXBContext.newInstance(Torrent.class);
		Marshaller marshaller = context.createMarshaller();
		marshaller.marshal(a, new File("a.out"));
		
		Unmarshaller unmarshaller = context.createUnmarshaller();
		System.out.println(unmarshaller.unmarshal(new File("a.out")));
	}

}
